// Fill out your copyright notice in the Description page of Project Settings.


#include "GamePC.h"
#include "Kismet/GameplayStatics.h"
#include "../MySQL/MySQLSubsystem.h"
#include "Net/UnrealNetwork.h"



void AGamePC::BeginPlay()
{
	Super::BeginPlay();
}

void AGamePC::SInitPlayerReadyInfo_Implementation(int32 ID)
{
	UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld());
	PlayerReadyInfo=GameInstance->GetSubsystem<UMySQLSubsystem>()->QueryPlayerInfoFromDB(ID);
}

bool AGamePC::SInitPlayerReadyInfo_Validate(int32 ID)
{
	return true;
}

void AGamePC::CInitPlayerReadyInfo_Implementation(int32 ID)
{
	SInitPlayerReadyInfo(ID);
}

bool AGamePC::CInitPlayerReadyInfo_Validate(int32 ID)
{
	return true;
}

void AGamePC::GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);
	DOREPLIFETIME(AGamePC,PlayerReadyInfo);
}

